package com.sikaryofficial.backend.domain.dto.req;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 用户行为对象 user_action_t
 *
 * @author qinjinyuan
 * @date 2023-11-09
 */
@Getter
@Setter
@ToString
@ApiModel(value = "用户行为请求入参", description = "用户行为请求入参")
public class UserActionReq {
    /**
     * 用户行为ID
     */
    @ApiModelProperty(value = "用户行为ID", hidden = true)
    private Long userActionId;

    /**
     * 行为类型:1-点赞 2-收藏 3-转发
     */
    @ApiModelProperty(value = "行为类型:1-点赞 2-收藏 3-转发", example = "1")
    @Min(value = 1, message = "行为类型值最小为1")
    @Max(value = 3, message = "行为类型值最大为3")
    @NotNull(message = "actionType is null")
    private Integer actionType;

    @ApiModelProperty(value = "分享平台code(微信，QQ等)")
    private String platformCode;

    /**
     *
     *业务类型6-产品点赞;8-产品评价点赞;9-产品评价回复点赞;21-文章点赞;22-文章评论点赞;23-文章评论回复点赞;
     * 3-店铺收藏;10-产品收藏;15-活动收藏;24-文章收藏;
     * 5-产品分享;11-店铺分享;16-活动分享;25-文章转发
     *
     */
    @ApiModelProperty(value = "业务类型6-产品点赞;8-产品评价点赞;9-产品评价回复点赞;21-文章点赞;22-文章评论点赞;23-文章评论回复点赞;\n" +
            "     * 3-店铺收藏;10-产品收藏;15-活动收藏;24-文章收藏;\n" +
            "     * 5-产品分享;11-店铺分享;16-活动分享;25-文章转发; 34-店铺点赞", example = "15")
    @NotNull(message = "businessType is null")
    private Integer businessType;

    /**
     * 对象ID
     */
    @ApiModelProperty(value = "对象ID", example = "122234444")
    @NotNull(message = "objectId is null")
    private Long objectId;

    /**
     * 作者ID
     */
    @JsonIgnore
    private Long authorId;

    /**
     * 操作 新增 false  取消true (1-新增 2-取消)
     */
    @ApiModelProperty(value = "操作:false-新增;true-取消", example = "false")
    private boolean options;

    @ApiModelProperty(value = "是否通过指引任务触发", example = "true, 默认为:false")
    private Boolean hasGuideTask;

}
